import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class UDPDemo3{
	public static void main(String[] args) throws IOException{
		DatagramSocket socket = new DatagramSocket();
    	String str = "I love you!";
    	DatagramPacket packet1 = new DatagramPacket(str.getBytes(), str.length(), InetAddress.getByName("localhost"), 8889);
    	socket.send(packet1);
	}
}
